package com.example.demo.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * 添加 webSocket 配置
 */

@Configuration
public class WebSocketConfig {

    /**
     * 通过方法注解 把 web 配置注入
     * @return
     */
    @Bean
    public ServerEndpointExporter serverEndpointConfig() {
        return new ServerEndpointExporter();
    }
}
